
using System;
using System.Linq;

namespace MiniBotAlgorithmLibSample
{
    public partial class ApiSamples
    {

        /*
        关节角转空间坐标
       */
        public void Sample_CalJointAngleToTerminalCartesian()
        {
            var p2 = new float[6] { 20, 66, 88, 20, 80, 9 };
         
            var intPtrP2 = FloatArrayToIntptr(p2);
            var j2 = MiniBotAlgorithmLib.CalJointAngleToTerminalCartesian(intPtrP2);
            var pos = IntptrToFloatArray(j2, 6);

            Console.WriteLine($"关节角：");
            foreach (var c in p2)
            {
                Console.Write($"{c} ");
            }

            Console.WriteLine();
            Console.WriteLine($"转换成空间坐标：");
            foreach (var c in pos)
            {
                Console.Write($"{c} ");
            }


        }
    }
}


